Clock Roll-Back Detection

SoftwareShield System Feature Guide > Tamper Resistance > Clock Roll-Back Detection

## Clock Roll-Back Detection

Clock Roll-Back Detection is a permanent mechanism in the ClientProtector logic that attempts to determine if the system clock has been turned back (or "Rolled-Back"). This check occurs at various points in processing of your function calls (see: SoftwareShield ClientProtector Control Flow Charts).

Most operations on the ClientProtector that are successful cause the Last Used Date-Time field inside the encrypted license to be updated with the current date and time (in UTC time).

Since a common layman attack on an Expire Mode license is turning the system clock back to gain additional usage, the ClientProtector detects if time has moved backward since it was last started on a particular license.

If detected, it will return a normally special code (FALSE_CLOCK_TURNED_BACK) to your software that will allow you to (optionally) prompt the user to correct their clock. Unlike other possible inconsistent states of a license, when the clock is detected to have been turned back, the license cannot be "recovered" until the clock is corrected. (See License Recovery for more information).

### Clock Roll-Back Detection Tolerance

Some users may use the Windows date/time service to update their systems date and time to automatically synchronize with a servers data and time. This can cause the system clock to change automatically for legitimate reasons without the users knowledge. The clock can potentially change in either direction and so it is possible that a clock-rollback is detected when none is present. The Windows time service is installed by default on system s that are part of an NT domain. Non-domain users can also use the service but must turn it on manually. If you are concerned about the possibility of this occurring, or simply want to allow the user the ability to make small changes to their clock without detecting a roll-back, you may use the Clock Roll-Back Detection Tolerance settings to give the user as little as 1 second to as much as 24 hours tolerance.

### More Information

For help on how to make your program more secure, see the Non-IronWrapping Anti-Hacker Guide in the Developing Applications Using The SoftwareShield System Reference.

For help on actually setting your clock roll-back detection tolerance, see License Behaviour Tab.